from operator import truediv


def is_pal(num):
    num = str(num)
    return num == num[::-1]

if __name__ == '__main__':
    for i in range(1, 1000):
        if(is_pal(i)):
            print(i, end=' ')